<html style="height: 100%; width: 100%;">
  <head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/default.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script>

    <!-- and it's easy to individually load additional languages -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/go.min.js"></script>

    <script>hljs.highlightAll();</script>
  </head>
  <body style="height: 100%; width: 100%;">
    <div class="container" style="background-color: #f3f3f3; height: 100%;">
      <!-- 代码预览 -->
      <div style="flex: 1; padding: 5px;">
        <h2>代码</h2>
        <pre style="flex: 1;">
          <code>
            echo date('Y-m-d H:i:s');<br>
            date_default_timezone_set('PRC');<br>
            <hr>
      
            echo date('Y-m-d H:i:s');<br>
            echo date('Y年m月d日');<br>
            <hr>
      
            $date1=checkdate(2,29,2024);<br>
            var_dump($date1);<br>
            <hr>
      
            $time1=mktime(12,34,56,2,29,2024);<br>
            echo $time1;<br>
            echo date('Y 年 m 月 d 日',$time1);<br>
            echo date('Y-m-d H:i:s',$time1);<br>
      
            <hr>
            $time2=mktime(12,34,56,11,35,2024);<br>
            echo $time2;<br>
            echo date('Y 年 m 月 d 日',$time2);<br>
            <hr>
      
            $today=getdate();<br>
            var_dump($today);<br>
            echo "$today[mon]月$today[mday]日";<br>
            <hr>
      
            var_dump(getdate((time()-3600)));
          </code>
        </pre>
      </div>


      <!-- 代码输出 -->
      <div style="flex: 1; padding: 5px; color: black; background-color: #fff; height: 100%; overflow: auto;">
        <h2 style="color: green;">php 输出效果</h2>
        <pre style="flex: 1; padding: 5px; color: black; background-color: #fff;">
          <?php
            echo date('Y-m-d H:i:s');
      
            date_default_timezone_set('PRC');
            echo '<hr>';
      
            echo date('Y-m-d H:i:s'),'<br>';
            echo date('Y年m月d日'),'<br>';
            echo '<hr>';
      
            $date1=checkdate(2,29,2024);
            var_dump($date1);
            echo '<hr>';
      
            $time1=mktime(12,34,56,2,29,2024);
            echo $time1,'<br>';
            echo date('Y 年 m 月 d 日',$time1),'<br>';
            echo date('Y-m-d H:i:s',$time1),'<br>';
      
            echo '<hr>';
            $time2=mktime(12,34,56,11,35,2024);
            echo $time2,'<br>';
            echo date('Y 年 m 月 d 日',$time2),'<br>';
            echo '<hr>';
      
            $today=getdate();
            var_dump($today);
            echo "<hr>";
            $today_mon=$today['mon'];
            $today_mday=$today['mday'];
            echo "$today_mon 月 $today_mday 日",'<hr>';
      
            var_dump(getdate((time()-3600)));
          ?>
        </pre>
      </div>

    </div>
  </body>
  <style>
    .container {
      display: flex;
    }
  </style>
</html>